# 基于alpine镜像
FROM alpine

# 替换为国内的软件（清华大学）
RUN sed -i 's/https:\/\/dl-cdn.alpinelinux.org/http:\/\/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories

# 更新软件包列表，安装项目和tomcat的依赖软件
RUN apk update && apk add redis

# 启动命令
ENTRYPOINT ["redis-server", "--protected-mode", "no", "--cluster-enabled", "yes", "--dir", "/var/lib/redis/"]
